SetEnvironment
SetEnvironment["var"->value] sets the value of an operating system environment variable.
SetEnvironment[{"var"->value,…}] sets values for several environment variables.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.